﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Djs.Common
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Data.XDateTime xdaad = new Data.XDateTime(781225, 8, 5, 18, 45, 00);
            long year = xdaad.Year;
            int month = xdaad.Month;
            int day = xdaad.Day;


            Data.XDateTime date = new Data.XDateTime(12450, 3, 28, 6, 45, 0);
            int testYear = 2450; //  (date.IsLeap ? 2000 : 2001);
            Data.XTimeSpan time2 = new Data.XTimeSpan(12, 0, 0, 0);
            Data.XDateTime date2 = date.Add(time2);

            Data.XTimeSpan time3 = new Data.XTimeSpan(50, 0, 0, 0);
            Data.XDateTime date3 = date.Add(time3);
            DateTime dt3 = new DateTime(testYear, date.Month, date.Day, date.Hour, date.Minute, date.Second).Add(TimeSpan.FromDays(time3.Days));

            Data.XTimeSpan time4 = new Data.XTimeSpan(-115425, 0, 0, 0);
            Data.XDateTime date4 = date.Add(time4);
            DateTime dt4 = new DateTime(2450, date.Month, date.Day, date.Hour, date.Minute, date.Second).Add(TimeSpan.FromDays(time4.Days));





            Data.XDateTime xd = new Data.XDateTime(2014, 4, 20, 18, 45, 00);
            Data.XDateTime xt = xd.Subtract(new Data.XTimeSpan(12, 0, 0));

            Application.Run(new TestForm());
            // Application.Run(new Forms.EditorForm());
        }
    }
}
